package com.opennews.openplatform.controller;

import com.opennews.openplatform.dto.CheckPermissionDto;
import com.opennews.openplatform.service.AuthService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RestController
@RequestMapping("/auth")
public class AuthController {
    private final AuthService authService;

    @PostMapping("/permissions/check")
    public ResponseEntity<Boolean> checkPermission(@RequestBody CheckPermissionDto data) {
        authService.test();

        return ResponseEntity.ok(true);
    }
}
